from math import sqrt
a=int(input())
a1=a//1000
a2=a//100
a3=a//10
a4=a%10%100
a5=a%10%100%1000
a6=a%100
a7=a//1
a8=a%1000
a9=a%1000//10
B=[a1, a2, a3,a4,a5,a6,a7,a8,a9]
for i in B :
    prime= True
    m=2
    while m<=sqrt(i):
        if i%m==0:
            prime= False
            break
        m+=1
print(B)
